// 应用全局配置
export default {
  // // 本地调试配置
  // // 后台API服务器
  // baseUrl: process.env.VUE_APP_API_SERVER || 'http://101.200.58.249:8081',
  // // Ten Framework语音服务器
  // tenFrameworkUrl: process.env.VUE_APP_TEN_SERVER || 'http://39.105.24.68:3000/api',
  // // 后台websocketAPI服务器 - 通过nginx代理
  // wsBaseUrl: process.env.VUE_APP_WS_SERVER || 'http://39.105.24.68:8082',

  // 生产环境配置
  // 使用同源相对路径，通过 Nginx 代理到后端，避免混合内容与跨域
  baseUrl: process.env.VUE_APP_API_SERVER || '/api',
  // Ten Framework语音服务器
  tenFrameworkUrl: process.env.VUE_APP_TEN_SERVER || 'https://chatbot.ccbjb.com.cn/tenapi',
  // WebSocket 也使用相对路径
  wsBaseUrl: process.env.VUE_APP_WS_SERVER || 'https://chatbot.ccbjb.com.cn',
  

  // RTC配置
  rtc: {
    appId: process.env.VUE_APP_AGORA_APP_ID || '379bc1c4d0334c5e83d82940c6462bc2'
  },
  
  // TTS配置（前端只保留非敏感配置）
  tts: {
    // 注意：敏感信息（appId, accessToken）已移至后端配置
    defaultVoice: 'zh_female_kefunvsheng_mars_bigtts',
    sampleRate: 16000,
    // 流式TTS配置
    enableStreaming: false,  // 临时禁用流式TTS
    streamingTimeout: 60000, // 60秒超时
    // 使用代理模式（推荐）
    useProxy: true,
    // 降级到浏览器内置TTS
    useBrowserTts: true
  },
  
  // Trulience数字人配置
  trulience: {
    trulienceSDK: '/static/trulience.sdk.js', // 本地SDK路径
    // trulience 账号

    // const avatarId = "2385174266565971389" 
    // avatarToken: process.env.VUE_APP_TRULIENCE_TOKEN || 'MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEAmt87MNImwFCKXGX0BWptLuVbCrMH9cv/AHLRyA0qeqYNkSSynME6KmlTbRlFZXVunKI8DMRx/a39dxWSxuPiBwIDAQABAkAOW7vlHtaw5cauIlWpWuCchG8YYtjOFQejRwHkBjR2AmFMWl9XrTqtPAAEvyrEdSo9kfRsnot8Htn2hdh9sV3BAiEA+UQ+gJMLhXg8OElWyb9B3Z4aPBhgxKBMaR9kOHqc7z8CIQCfDjgdZATREvgiWudpdq2jauOY34jrGotJoABEaIMjOQIgfmhYVfW8CwSNbXHrvEXsjgnGfiFSuYQdG9ZaibXMbhsCIQCYCMtyrIw+HNe6XxIcKSjIr/9lvSXvNKw3cA1RVmUjYQIhANoeuo5JvnHtn/Ny7Y3DDZc2y1EEujqGHUgPusQ3nzHF'
    
    // ---------------------------------------------------------------------------------
    
    // const avatarId = "571470106713214004"
    // avatarToken: process.env.VUE_APP_TRULIENCE_TOKEN || 'MIIBVgIBADANBgkqhkiG9w0BAQEFAASCAUAwggE8AgEAAkEA5kJwZgan9DGKHFMUE2eZEjgV3OkVC2J/Z8OkimBDWoIHVmV5c29hwt1O8DefVmd5WYeQ0GzsbdF4SKNHp8IK2wIDAQABAkEAlDXfs0xFf2EDzQeMvJDKbne7Wt6MtS9JYrkDiC4+LFqdXyEOH62JUlHPh0Lt7CbM7kIx9Oz2iSU+HB4yHg3pgQIhAPQjFhkCOmXLE2etT9mK5WXcHhm21oPokA2RPahhcf+ZAiEA8XK5kg4Yh0GpXTq78yU/N6Dbs0H8rjM7pN6+hseyNpMCIEjP9hU7XuNhL8ZqIDiHfmdkwO12ZIAu6lfBi5weg/txAiEAxDqYRPK9zpd33TRR8j+QTFaol9yGTtGGpOz+7a040o8CIQCbyK8XAdlYY8BII5S3WZTRPWv/n+62MpqmfJrpYVhFjg=='
    
    // ---------------------------------------------------------------------------------------
    
    // const avatarId = "8661339709514075685"
    // avatarToken: process.env.VUE_APP_TRULIENCE_TOKEN || 'MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEAx2B2Yb4kp7PB206y6k/gbjrVMxjtwyonKAPxRphguOKgR2HeOHKlVu5hEx8Gvscnf59fgaFwqOAqVg23D3GJnQIDAQABAkAliajgQD+Af5ypIMkYyo8z0cngQ/pH+4DBzPQ5WWkkhdlcgyrNcObh/GsxgkX7fzVphM7PH9lM+fX4JuKRBdahAiEA87InBazZWgVQzaUOI6X5GRDKiqPFgKdUCmjUqOM+dQUCIQDRcXiv055ZjcFnEunp4tERDYBnfRnmkdbA7DrjD9RluQIhAMqZgPGp6yV5J91f7KpccQSSviCW2TsFYcwprSsfiaxVAiEAp1HDXJPuuRRqIXIWtOaipsDmh8aFXpG7wrv1/1eyEuECICF2EPh/BPGaNm7tnlWTj1fv2jsc+MJuZMhPyhI3D1Yl'
    
    // ---------------------------------------------------------------------------------------
    
    // const avatarId = "4687442394199509796"
    avatarToken: process.env.VUE_APP_TRULIENCE_TOKEN || 'MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAjbQYnsFCgYVxJI6blA2rVZb9c1Eosm3KN/aQbqy+mnzmjoBqPnXwWjb29HejeiQCoiZPa8ZLq21PHCO3srJaCwIDAQABAkAw2JbwCpBhU11oC5yHkZqw+0ZMvPo5X20ok17AN93QJKAxRMMD7Nsf2qUIWsJEgt6BiWHAt61DaMYT25K22Sf5AiEAzM3zgTwn2uGMCtm0RLJMP+td+cuMmULHouXZVmVmuE0CIQCxIB/kxj9Fv60fORQXi4KONV98725J55NsOYkSwWSHtwIgOYtMde1fDWL+JDZTLlIilnsdZohIsu9OhHisflfzaqkCIFlUNkGOqgJnNMx2YOeu+Fz4FfxQVHL5U6RVMAhBeI3pAiBOo7ybsVIV0KYOBrN5IuANd3NYOu4xmXygszE6+64vCg=='
    
    // ---------------------------------------------------------------------------------------

  },

  // LiteAvatar数字人配置
  liteAvatar: {
    // 本地开发环境
    // imageServiceUrl: process.env.VUE_APP_LITEAVATAR_IMAGE_URL || 'ws://192.168.3.102:6006',
    // videoServiceUrl: process.env.VUE_APP_LITEAVATAR_VIDEO_URL || 'ws://192.168.3.102:6006',
    
    // 生产环境示例（需根据实际部署调整）
    imageServiceUrl: process.env.VUE_APP_LITEAVATAR_IMAGE_URL || 'wss://u454655-8e18-0493c7a1.bjb1.seetacloud.com:8443',
    videoServiceUrl: process.env.VUE_APP_LITEAVATAR_VIDEO_URL || 'wss://u454655-8e18-0493c7a1.bjb1.seetacloud.com:8443',
  },
  
  // 应用信息
  appInfo: {
    name: "ruoyi-app",
    version: "1.2.0",
    logo: "/static/logo.png",
    site_url: "http://ruoyi.vip",
    agreements: [{
        title: "隐私政策",
        url: "https://ruoyi.vip/protocol.html"
      },
      {
        title: "用户服务协议",
        url: "https://ruoyi.vip/protocol.html"
      }
    ]
  }
}
